package com.xxx.utils;

import com.xxx.pojo.Admin;
import org.springframework.security.core.context.SecurityContextHolder;

/**
 * 操作员工具类
 * @author WXH
 * @version 1.0
 * @date 2022/3/3 20:40
 */
public class AdminUtils {
    /**
     *
     */
    public static Admin getCurrentAdmin(){
        return (Admin) SecurityContextHolder
                .getContext().getAuthentication().getPrincipal();
    }
}
